﻿<?xml version="1.0" encoding="utf-8"?>
<Witd:WITD application="Work item type editor" version="1.0" xmlns:Witd="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef">
  <WORKITEMTYPE name="FunctionPoint.CodeImplementationItem">
    <DESCRIPTION>Tracks work that needs to be done on a section of code in a changeset fo a particular parent work item.</DESCRIPTION>
    <FIELDS>
      <FIELD name="Title" refname="System.Title" type="String" reportable="dimension">
        <REQUIRED />
        <HELPTEXT>Work required and how this will implement a User Story</HELPTEXT>
      </FIELD>
      <FIELD name="State" refname="System.State" type="String" reportable="dimension">
        <HELPTEXT>Active = work remains to be done. Closed = tested and checked in.</HELPTEXT>
      </FIELD>
      <FIELD name="Rev" refname="System.Rev" type="Integer" reportable="dimension" />
      <FIELD name="Changed By" refname="System.ChangedBy" type="String" syncnamechanges="true" reportable="dimension">
        <ALLOWEXISTINGVALUE />
        <VALIDUSER />
      </FIELD>
      <FIELD name="State Change Date" refname="Microsoft.VSTS.Common.StateChangeDate" type="DateTime">
        <WHENCHANGED field="System.State">
          <SERVERDEFAULT from="clock" />
        </WHENCHANGED>
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Activated Date" refname="Microsoft.VSTS.Common.ActivatedDate" type="DateTime" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Activated By" refname="Microsoft.VSTS.Common.ActivatedBy" type="String" syncnamechanges="true" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <ALLOWEXISTINGVALUE />
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Reason" refname="System.Reason" type="String" reportable="dimension">
        <HELPTEXT>The reason why the task is in its current state</HELPTEXT>
      </FIELD>
      <FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
        <ALLOWEXISTINGVALUE />
        <VALIDUSER />
        <HELPTEXT>The person currently working on this task</HELPTEXT>
      </FIELD>
      <FIELD name="Work Item Type" refname="System.WorkItemType" type="String" reportable="dimension" />
      <FIELD name="Closed Date" refname="Microsoft.VSTS.Common.ClosedDate" type="DateTime" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Closed By" refname="Microsoft.VSTS.Common.ClosedBy" type="String" syncnamechanges="true" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <ALLOWEXISTINGVALUE />
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Priority" refname="Microsoft.VSTS.Common.Priority" type="Integer" reportable="dimension">
        <ALLOWEDVALUES>
          <LISTITEM value="1" />
          <LISTITEM value="2" />
          <LISTITEM value="3" />
          <LISTITEM value="4" />
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="2" />
        <HELPTEXT>Importance to business</HELPTEXT>
      </FIELD>
      <FIELD name="Stack Rank" refname="Microsoft.VSTS.Common.StackRank" type="Double" reportable="dimension">
        <HELPTEXT>Work first on items with lower-valued stack rank. Set in triage.</HELPTEXT>
      </FIELD>
      <FIELD name="Integration Build" refname="Microsoft.VSTS.Build.IntegrationBuild" type="String" reportable="dimension">
        <SUGGESTEDVALUES>
          <LISTITEM value="&lt;None&gt;" />
        </SUGGESTEDVALUES>
        <HELPTEXT>The build in which the bug was fixed</HELPTEXT>
      </FIELD>
      <FIELD name="Created Date" refname="System.CreatedDate" type="DateTime" reportable="dimension" />
      <FIELD name="Created By" refname="System.CreatedBy" type="String" syncnamechanges="true" reportable="dimension" />
      <FIELD name="Activity" refname="Microsoft.VSTS.Common.Activity" type="String" reportable="dimension">
        <SUGGESTEDVALUES>
          <LISTITEM value="Development" />
          <LISTITEM value="Testing" />
          <LISTITEM value="Requirements" />
          <LISTITEM value="Design" />
          <LISTITEM value="Deployment" />
          <LISTITEM value="Documentation" />
        </SUGGESTEDVALUES>
        <HELPTEXT>Type of work involved</HELPTEXT>
      </FIELD>
      <FIELD name="Remaining Work" refname="Microsoft.VSTS.Scheduling.RemainingWork" type="Double" reportable="measure">
        <HELPTEXT>An estimate of the number of units of work remaining to complete this task</HELPTEXT>
      </FIELD>
      <FIELD name="Original Estimate" refname="Microsoft.VSTS.Scheduling.OriginalEstimate" type="Double" reportable="measure">
        <HELPTEXT>Initial value for Remaining Work - set once, when work begins</HELPTEXT>
      </FIELD>
      <FIELD name="Start Date" refname="Microsoft.VSTS.Scheduling.StartDate" type="DateTime" reportable="dimension">
        <HELPTEXT>The date to start the task</HELPTEXT>
      </FIELD>
      <FIELD name="Finish Date" refname="Microsoft.VSTS.Scheduling.FinishDate" type="DateTime" reportable="dimension">
        <HELPTEXT>The date to finish the task</HELPTEXT>
      </FIELD>
      <FIELD name="Completed Work" refname="Microsoft.VSTS.Scheduling.CompletedWork" type="Double" reportable="measure">
        <HELPTEXT>The number of units of work that have been spent on this task</HELPTEXT>
      </FIELD>
      <FIELD name="Description" refname="System.Description" type="PlainText">
        <HELPTEXT>What to do, pointers to resources and inputs, design notes, exit criteria</HELPTEXT>
      </FIELD>
      <FIELD name="History" refname="System.History" type="History">
        <HELPTEXT>Discussion thread plus automatic record of changes</HELPTEXT>
      </FIELD>
      <FIELD name="Related Link Count" refname="System.RelatedLinkCount" type="Integer" />
      <FIELD name="Iteration Path" refname="System.IterationPath" type="TreePath" reportable="dimension">
        <HELPTEXT>The iteration within which this task will be completed</HELPTEXT>
      </FIELD>
      <FIELD name="Iteration ID" refname="System.IterationId" type="Integer" />
      <FIELD name="External Link Count" refname="System.ExternalLinkCount" type="Integer" />
      <FIELD name="Team Project" refname="System.TeamProject" type="String" reportable="dimension" />
      <FIELD name="Hyperlink Count" refname="System.HyperLinkCount" type="Integer" />
      <FIELD name="Attached File Count" refname="System.AttachedFileCount" type="Integer" />
      <FIELD name="Node Name" refname="System.NodeName" type="String" />
      <FIELD name="Area Path" refname="System.AreaPath" type="TreePath" reportable="dimension">
        <HELPTEXT>The area of the product to which this task contributes</HELPTEXT>
      </FIELD>
      <FIELD name="Revised Date" refname="System.RevisedDate" type="DateTime" reportable="detail" />
      <FIELD name="Changed Date" refname="System.ChangedDate" type="DateTime" reportable="dimension" />
      <FIELD name="ID" refname="System.Id" type="Integer" reportable="dimension" />
      <FIELD name="Area ID" refname="System.AreaId" type="Integer" />
      <FIELD name="Authorized As" refname="System.AuthorizedAs" type="String" syncnamechanges="true" />
      <FIELD name="Design Point Work Item Id" refname="FunctionPoint.CodeImplementationPoint.ParentWorkItemId" type="Integer" reportable="dimension">
        <HELPTEXT>Only applies to legacy 2008</HELPTEXT>
      </FIELD>
      <FIELD name="CIP Engineer" refname="FunctionPoint.CodeImplementationPoint.EngineerName" type="String" reportable="dimension" />
      <FIELD name="CIP FilePath" refname="FunctionPoint.CodeImplementationPoint.FilePath" type="String" reportable="dimension" />
      <FIELD name="CIP ChangeSet ID" refname="FunctionPoint.CodeImplementationPoint.ChangeSetId" type="String" reportable="dimension" />
      <FIELD name="CIP Namespace" refname="FunctionPoint.CodeImplementationPoint.CodeElement.Namespace" type="String" reportable="dimension" />
      <FIELD name="CIP Class" refname="FunctionPoint.CodeImplementationPoint.CodeElement.Class" type="String" reportable="dimension" />
      <FIELD name="CIP Method" refname="FunctionPoint.CodeImplementationPoint.CodeElement.Method" type="String" reportable="dimension" />
      <FIELD name="CIP Interface" refname="FunctionPoint.CodeImplementationPoint.CodeElement.Interface" type="String" reportable="dimension" />
      <FIELD name="CIP Span Start Point" refname="FunctionPoint.CodeImplementationPoint.CodeElement.SpanStartPoint" type="Integer" />
      <FIELD name="CIP Span End Point" refname="FunctionPoint.CodeImplementationPoint.CodeElement.SpanEndPoint" type="Integer" />
      <FIELD name="CIP Code Snippet HTML" refname="FunctionPoint.CodeImplementationPoint.CodeElement.CodeSnippetHtml" type="HTML" />
      <FIELD name="Code Snippet Plain" refname="FunctionPoint.CodeImplementationPoint.CodeSnippetPlain" type="String" />
    </FIELDS>
    <WORKFLOW>
      <STATES>
        <STATE value="Active">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <ALLOWEXISTINGVALUE />
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Closed" />
      </STATES>
      <TRANSITIONS>
        <TRANSITION from="" to="Active">
          <REASONS>
            <DEFAULTREASON value="New" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <ALLOWEXISTINGVALUE />
              <COPY from="currentuser" />
              <VALIDUSER />
              <REQUIRED />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Active" to="Closed">
          <REASONS>
            <REASON value="Deferred" />
            <REASON value="Obsolete" />
            <REASON value="Cut" />
            <DEFAULTREASON value="Completed" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <READONLY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <ALLOWEXISTINGVALUE />
              <READONLY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <ALLOWEXISTINGVALUE />
              <COPY from="currentuser" />
              <VALIDUSER />
              <REQUIRED />
            </FIELD>
          </FIELDS>
          <ACTIONS>
            <ACTION value="Microsoft.VSTS.Actions.Checkin" />
          </ACTIONS>
        </TRANSITION>
        <TRANSITION from="Closed" to="Active">
          <REASONS>
            <DEFAULTREASON value="Reactivated" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <ALLOWEXISTINGVALUE />
              <COPY from="currentuser" />
              <VALIDUSER />
              <REQUIRED />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
            <FIELD refname="System.AssignedTo">
              <COPY from="field" field="Microsoft.VSTS.Common.ClosedBy" />
            </FIELD>
          </FIELDS>
        </TRANSITION>
      </TRANSITIONS>
    </WORKFLOW>
    <FORM>
      <Layout>
        <Group>
          <Column PercentWidth="80">
            <Control FieldName="System.Title" Type="FieldControl" Label="&amp;Title:" LabelPosition="Left" />
          </Column>
          <Column PercentWidth="20">
            <Control FieldName="Microsoft.VSTS.Common.Activity" Type="FieldControl" Label="Activit&amp;y:" LabelPosition="Left" />
          </Column>
        </Group>
        <Group>
          <Column PercentWidth="50">
            <Group Label="Status">
              <Column PercentWidth="100">
                <Control FieldName="System.AssignedTo" Type="FieldControl" Label="Assi&amp;gned To:" LabelPosition="Left" />
                <Control FieldName="System.State" Type="FieldControl" Label="&amp;State:" LabelPosition="Left" />
                <Control FieldName="System.Reason" Type="FieldControl" Label="&amp;Reason:" LabelPosition="Left" />
              </Column>
            </Group>
          </Column>
          <Column PercentWidth="50">
            <Group Label="Classification">
              <Column PercentWidth="100">
                <Control FieldName="System.AreaPath" Type="WorkItemClassificationControl" Label="&amp;Area:" LabelPosition="Left" />
                <Control FieldName="System.IterationPath" Type="WorkItemClassificationControl" Label="Ite&amp;ration:" LabelPosition="Left" />
              </Column>
            </Group>
          </Column>
        </Group>
        <Group>
          <Column PercentWidth="50">
            <Group Label="Planning">
              <Column PercentWidth="50">
                <Control FieldName="Microsoft.VSTS.Common.StackRank" Type="FieldControl" Label="Stack Ran&amp;k:" LabelPosition="Left" NumberFormat="DecimalNumbers" MaxLength="10" />
              </Column>
              <Column PercentWidth="50">
                <Control FieldName="Microsoft.VSTS.Common.Priority" Type="FieldControl" Label="&amp;Priority:" LabelPosition="Left" />
              </Column>
            </Group>
          </Column>
          <Column PercentWidth="50">
            <Group Label="Effort (Hours)">
              <Column PercentWidth="33">
                <Control FieldName="Microsoft.VSTS.Scheduling.OriginalEstimate" Type="FieldControl" Label="Original &amp;Estimate:" LabelPosition="Left" />
              </Column>
              <Column PercentWidth="33">
                <Control FieldName="Microsoft.VSTS.Scheduling.RemainingWork" Type="FieldControl" Label="Re&amp;maining:" LabelPosition="Left" />
              </Column>
              <Column PercentWidth="33">
                <Control FieldName="Microsoft.VSTS.Scheduling.CompletedWork" Type="FieldControl" Label="Comp&amp;leted:" LabelPosition="Left" />
              </Column>
            </Group>
          </Column>
        </Group>
        <TabGroup>
          <Tab Label="Details">
            <Group>
              <Column PercentWidth="50">
                <Control FieldName="System.Description" Type="HtmlFieldControl" Label="&amp;Description:" LabelPosition="Top" Dock="Fill" />
              </Column>
              <Column PercentWidth="50">
                <Control FieldName="System.History" Type="WorkItemLogControl" Label="&amp;History:" LabelPosition="Top" Dock="Fill" />
              </Column>
            </Group>
          </Tab>
          <Tab Label="Implementation">
            <Group>
              <Column PercentWidth="50">
                <Control FieldName="Microsoft.VSTS.Build.IntegrationBuild" Type="FieldControl" Label="In&amp;tegrated in Build:" LabelPosition="Left" />
              </Column>
              <Column PercentWidth="50" />
            </Group>
            <Control Type="LinksControl" Name="Hierarchy" Label="Parents and &amp;Child Tasks:" LabelPosition="Top">
              <LinksControlOptions>
                <WorkItemLinkFilters FilterType="include">
                  <Filter LinkType="System.LinkTypes.Hierarchy" />
                </WorkItemLinkFilters>
                <WorkItemTypeFilters FilterType="include">
                  <Filter WorkItemType="Task" />
                  <Filter WorkItemType="User Story" />
                </WorkItemTypeFilters>
                <ExternalLinkFilters FilterType="excludeAll" />
                <LinkColumns>
                  <LinkColumn RefName="System.ID" />
                  <LinkColumn RefName="System.WorkItemType" />
                  <LinkColumn RefName="System.Title" />
                  <LinkColumn RefName="System.AssignedTo" />
                  <LinkColumn RefName="System.State" />
                  <LinkColumn LinkAttribute="System.Links.Comment" />
                </LinkColumns>
              </LinksControlOptions>
            </Control>
          </Tab>
          <Tab Label="All Links">
            <Control Type="LinksControl" Name="GeneralLinks" LabelPosition="Top">
              <LinksControlOptions>
                <LinkColumns>
                  <LinkColumn RefName="System.ID" />
                  <LinkColumn RefName="System.WorkItemType" />
                  <LinkColumn RefName="System.Title" />
                  <LinkColumn RefName="System.AssignedTo" />
                  <LinkColumn RefName="System.State" />
                  <LinkColumn LinkAttribute="System.Links.Comment" />
                </LinkColumns>
                <WorkItemLinkFilters FilterType="includeAll" />
                <ExternalLinkFilters FilterType="includeAll" />
                <WorkItemTypeFilters FilterType="includeAll" />
              </LinksControlOptions>
            </Control>
          </Tab>
          <Tab Label="Attachments">
            <Control Type="AttachmentsControl" LabelPosition="Top" />
          </Tab>
          <Tab Label="Code Elements">
            <Control FieldName="FunctionPoint.CodeImplementationPoint.CodeElement.CodeSnippetHtml" Type="HtmlFieldControl" Label="Code Snippet:" LabelPosition="Top" Dock="Fill" ReadOnly="True" />
          </Tab>
        </TabGroup>
      </Layout>
    </FORM>
  </WORKITEMTYPE>
</Witd:WITD>